<template>
	<view>
		<view class="delete" v-if="type != 'add'">
			<image class="img" src="@/static/img/delete.png" mode="widthFix"></image>
		</view>
		<view style="padding: 0rpx 20rpx; margin-top: 20rpx;">
			<view class="popup_form">
				<u-form :model="form" ref="uForm" label-align="right" label-width="180rpx">
					<u-form-item label="管理员名称："><u-input :clearable="false" placeholder="请输入" /></u-form-item>
					<u-form-item label="身份："right-icon="arrow-down">
						<u-input :clearable="false" placeholder="请选择" v-model="value"
							@click="show = true"/>
					</u-form-item>
					<u-form-item label="手机号："><u-input :clearable="false" placeholder="请输入" /></u-form-item>
					<u-form-item label="密码：">
						<u-input
							type="password"
							:clearable="false"
							placeholder="请输入" />
					</u-form-item>
				</u-form>
			</view>
		</view>
		<view class="dc_top">
			<view class="dc_btn">添加身份</view>
		</view>
		<u-select confirm-color="#E93E30" v-model="show" mode="mutil-column-auto" :list="list"
			@confirm="confirm"></u-select>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				value: '',
				list: [{
						value: '1',
						label: '店长'
					},
					{
						value: '2',
						label: '配送员'
					},
					{
						value: '2',
						label: '副店长'
					},
					{
						value: '2',
						label: '营业员'
					}
				],
			}
		},
		onLoad(e) {
			this.type = e.type
		},
		methods: {
			confirm(e) {
				this.value = e[0].label
			},
		}

	}
</script>

<style scoped lang="scss">
	::v-deep .u-form-item__body {
		padding: 0 20rpx;
	}
	.delete {
		display: flex;
		justify-content: flex-end;
		padding: 23rpx 20rpx 0;

		.img {
			width: 42rpx;
		}
	}

	.id_input {
		display: flex;
		align-items: center;
		background: #FFFFFF;
		padding-left: 30rpx;
		border-radius: 10rpx;

		.id_size {
			font-size: 28rpx;
			font-weight: 500;
			line-height: 39rpx;
			color: #333333;
			margin-right: 36rpx;

		}
	}

	.popup_form {
		background: #FFFFFF;
	}

	.dc_top {
		position: fixed;
		bottom: 80rpx;
		width: 100%;
		padding: 0rpx 37rpx;
		left: 0;

		.dc_btn {
			height: 88rpx;
			border-radius: 44rpx;
			background: linear-gradient(147.27deg, #F1714E 0%, #E93E30 100%);
			font-size: 32rpx;
			font-weight: 500;
			line-height: 44rpx;
			color: #FFF;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>
<style>
	page {
		background-color: #F4F5F7;
		box-sizing: border-box;
	}

	::v-deep .u-form-item--left__content {
		padding-right: 15rpx !important;
	}
</style>